package cn.com.idmy.cloud;

import cn.com.idmy.cloud.config.DefaultTransactionConfig;
import cn.com.idmy.cloud.config.GlobalFeignConfig;
import cn.com.idmy.cloud.config.GlobalRestTemplateConfig;
import cn.com.idmy.cloud.config.GlobalWebConfig;
import cn.com.idmy.cloud.controller.BizEnumController;
import cn.com.idmy.cloud.controller.DruidMonitorController;
import org.jetbrains.annotations.NotNull;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import({DefaultTransactionConfig.class, GlobalWebConfig.class, GlobalFilter.class, GlobalRestTemplateConfig.class, BizEnumController.class, DruidMonitorController.class})
public class DmyWebAutoConfiguration {
    @Bean
    @NotNull
    @ConditionalOnClass(name = "feign.RequestInterceptor")
    public Object globalFeignConfig() {
        return new GlobalFeignConfig();
    }
}